using System;
using System.Collections.Generic;
using Hymans.Charles.JAudit.SyntaxNodes;

namespace Hymans.Charles.JAudit
{
	public class Visitor : IVisitor
	{
		// TODO: should add an information about the line in the file for the warning
		public List<Warning> Warnings
		{
		 	get;
			private set;
		}
		
		internal Visitor()
		{
			this.Warnings = new List<Warning>();
		}
		
		public void ProcessIfThenElseStatement(IfThenElseStatement statement)
		{
			if (statement.HasElseBranch)
			{
				this.Warnings.Add(new Warning(statement.LineNumber, "If then else statement found"));
			}
		}
	}
}
